package variable

//强定义类型定义变量
int x=1
double y=3.14
//基本类型包装成对象类型
println(x.class)
println(y.class)

//弱类型定义变量
def z = 66
println(z.class)
z="abc"
println(z.class)

//三引号原样输出，单引号只能通过+拼接，不能$拼接。java.lang.String
def lines = '''\
line one
line two
line three'''
def name='q\'w\'e'
println(lines)
println(lines.class)
println(name)
println(name.class)

//双引号表示的字符串，可以扩展拼接$,可扩展任意表达式。org.codehaus.groovy.runtime.GStringImpl
def num = 'sari'
def sayhello = "hi,$num"
println(sayhello)
println(sayhello.class)



